import { useRouter } from "vue-router"
let router = useRouter()

// 获取token
export function getToken() {
    return localStorage.getItem("token") || null
}

export function logout() {
    localStorage.removeItem("token")
    router.replace({
        name: "login"
    })
}